///扁平化il语句
///调用函数演示:
/// VarInit("a",String("abc"));
///
/// VarGet("a");
/// Call("@system.print");
/// //输出 a的值
///
/// 
pub enum IntermediateLanguageSentence{
    ///定义变量
    VarInit{
        ///变量名
        var_name:String,
        ///变量值
        var_value:Value,
        ///作用域id
        scope_id:i64,
    },
    ///变量设置
    VarSet{
        ///变量名
        var_name:String,
        ///变量值
        var_value:Value,
    },
    ///获取值
    VarGet{
        ///变量名
        var_name:String,
        ///变量值
        var_value:Value,
    },
    ///标签定义
    Label{
        label_name: String,
    },
    ///无条件跳转
    JumpLabel{
        label_name:String,
    },
    Call{
        label_name:String,
    }
}



///解释器的运行语句
pub enum RichIntermediateLanguageSentence{
    ///压入
    StackPush(u8),
    ///压出
    StackPop,
    ///复制栈顶值
    StackCopy,
    ///复制偏移内存的值到栈顶
    Load(i64),
    ///
    Set(i64),
    ///调用函数
    Call(str),
    //+
    Add,
    //-
    Sub,
    //*
    Mul,
    //除
    Div,
    //释放指针对应的值
    Free,
    //
    //无条件跳转
    Jump(i64),
    JumpEquals(i64),
    JumpLess(i64),
    JumpGreater(i64),
    JumpGreate(i64),
    //执行虚拟机提供的函数
    MapInvoke(str),
}

///值
pub enum Value{
    String(String),
    Int(i32),
    Long(i64),
    LongLong(i128),
    Bool(bool),
    Float(f32),
    ///指针
    Pointer{
        pos:i128,
        size:i32,
    }
}